Atlas 1 Emulator Tutorial

The MAGUTILS Compiler

Introduction

The SERVICE compiler was a series of generally useful routines which could be invoked from a list of commands in the input stream. MAGUTILS (not an original Atlas feature) fulfils a similar rôle specialising in tasks which a user might want wish to undertake manipulating magnetic tapes or discs. In particular, manipulating the contents of Supervisor tapes while they are not in use. Note that, in all but one instance, the words TAPE, DISC and DISK are interchangable regardless of the device specified. All commands are case blind, upper case being assumed.

Sample Job

A typical job using COMPILER MAGUTILS might resemble -

JOB
ABC001 FRED BLOGGS TAPE MANIPULATION
STORE 15/20 BLOCKS
OUTPUT
0 ANY 1000 LINES
TAPE
16 MYTAPE
DISC COMMON
1/260
COMPUTING 2000 INSTRUCTIONS
COMPILER MAGUTILS

LIST COMPILERS ON TAPE 16
MAKE NEW SUPERVISOR DISC 1
COPY SOFTWARE FROM TAPE 16 TO TAPE 1
list compilers on disc 1
stop
***Z

The MAGUTILS system examines the list of commands, generates code to execute them and then executes the code. In the event that an error is detected, the system will report and halt or may fail with an Atlas error.

The Commands

PRINT TAPE n BLOCKS list of blocks WORDS list of words AS styles

Broadly equivalent to the command MAG TAPE LIST in COMPILER SERVICE, the PRINT TAPE command reads the specified block numbers of the magnetic tape or disc declared as n in the job description and prints the contents of each word in various formats, one word per line.

list of blocks should be a comma seperated list of the block numbers which you want to print. The form a-b may be employed to specify all the blocks between block a and block b inclusive.

list of words employs a similar syntax and may be used to specify which words within the specified blocks are of interest. The clause WORDS list of words may be omitted in which case WORDS 0-511 will be understood.

styles is a comma seperated list of styles in which each word is to be displayed. The available styles are

OCTAL Two halfwords printed as eight digit octal numbers
DECIMAL Two halfwords printed as 21-bit decimal numbers with an octal fraction
INSTRUCTION Printed as a four octal digit function code, a decimal B-Register number, another decimal B-Register number and an address in ABL format.
TEXT Printed as eight inner set characters (shift changes are ignored), followed by eight outer set characters. Backspace is rendered as “\” but all other unprintable characters are rendered as “.”.
REAL Printed as a floating point number
ALL All of the above.

The clause AS styles may be omitted in which case AS ALL will be understood.

The MAG TAPE LIST command in COMPILER SERVICE was rather more modest in scope although a COMPILER SERVICE command with similar capabilities was added towards the end of the life of the London Atlas (albeit, not elsewhere).

PATCH TAPE n BLOCK a WORD b to newvalue/newvalue

Word b of block a in tape n is to be overwritten by the two halfwords specified as newvalue/newvalue each of which may take one of several forms -

*octal up to eight octal digits (left justified)
b:w.f Block:word.character address form (as per ABL).
b:w As above but character address = 0 is implied.
w.c As above but block address = 0 is implied.
b: As above but word address = 0 and character address = 0 are implied.
w As above but block address = 0 and character address = 0 are implied.

COPY BLOCKS list of blocks FROM TAPE n TO TAPE m

Copies the specified list of blocks from tape (or disc) n to tape (or disc) m.

COMPARE BLOCKS list of blocks IN TAPE n AND TAPE m

Compares the specified list of blocks in tape (or disc) n and tape (or disc) m printing any differences found.

PRIVATEISE DISC n AS name

In the absence of a DISC NEW declaration in the Atlas job description, the only way (so far discovered) to create a private disc file is to use a DISC COMMON declaration then to use this command to convert it into a new private disc file with the specified name. Note that this is the single instance where the word TAPE cannot be subtituted for DISC.

The next set of commands may be used to manipulate tapes or discs in "Supervisor" format i.e. tapes or discs which may be used to hold Atlas system software.

MAKE NEW SUPERVISOR TAPE n

Formats a tape or disc as a “Supervisor” tape/disc.

Compilers and other system software may be added using the DEFINE COMPILER (1141) extracode. In addition the various commands mentioned below can manipulate the contents of the tape/disc. Note that, until a tape/disc has been formatted as such, none of the commands noted below will work, neither will the DEFINE COMPILER extracode.

LIST COMPILERS ON TAPE n

Analyses the nominated tape/disc and, assuming it is in Supervisor format, will list the name, compiler number position and size of each compiler present.

Note that there may be some entries with the name VOID. This is not a compiler, but denotes an area where a compiler used to be present but has either been deleted (see below) or having grown in size since its original definition has been relocated elsewhere.

COPY COMPILER name FROM TAPE n TO TAPE m

Copies the nominated compiler from one tape/disc to another. Both must be formatted as Supervisor tapes/discs.

REMOVE COMPILER name FROPM TAPE n

Deletes the nominated compiler replacing it with a VOID area (unless it happens to be the last compiler on the tape/disc).

CHANGE COMPILER name ON TAPE n TO name

Changes the nominated compiler name.

CHANGE COMPILER name NUMBER ON TAPE n TO a

The DEFINE COMPILER extracode appears to have no means of allocating compiler numbers. In the emulator, the number allocated will be unchanged if the compiler is being updated, or, if new (to this tape/disc) allocates a number one higher than the largest compiler number found. This commnand changes the number of the nominated compiler.

COPY SOFTWARE TAPE n TO TAPE m

Copies all the compilers on the source tape/disc to another, omitting any VOID areas thus potentially recovering any lost space. Both must be formatted as Supervisor tapes/discs.

Finally, three “control” commands.

STOP

Signifies the end of the list of commands and initiates the compiled code. This command may be omitted. The INPUT ENDED condition has the same effect.

CALL COMPILER n

As per STOP but instead of terminating the job once all the commands have been executed calls the nominated compiler so that a further program can be run.

SELECT OUTPUT n

Changes the output stream during execution of the commands.